package com.atguigu.spring.pojo;

import java.util.Arrays;

public class Student {
    private String name;
    private int age;
    private String homeSpace;
    private String gender;
    private Clazz clazz;
    private String[] hobbies;

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", homeSpace='" + homeSpace + '\'' +
                ", gender='" + gender + '\'' +
                ", clazz=" + clazz +
                ", hobbies=" + Arrays.toString(hobbies) +
                '}';
    }

    public String[] getHobbies() {
        return hobbies;
    }

    public void setHobbies(String[] hobbies) {
        this.hobbies = hobbies;
    }

    public Clazz getClazz() {
        return clazz;
    }

    public void setClazz(Clazz clazz) {
        this.clazz = clazz;
    }

    public Student() {
        System.out.println("生命周期1、实例化");
    }

    public Student(String name, int age, String homeSpace, String gender) {
        this.name = name;
        this.age = age;
        this.homeSpace = homeSpace;
        this.gender = gender;
    }
    public Student(String name, double age, String gender, String homeSpace) {
        this.name = name;
        this.age = (int) age;
        this.homeSpace = homeSpace;
        this.gender = gender;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getHomeSpace() {
        return homeSpace;
    }

    public void setHomeSpace(String homeSpace) {
        this.homeSpace = homeSpace;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

}
